const koa = require("koa");
// const cors = require("koa2-cors");                  //config/init.js
// const router = require("koa2-router")();        //router/index.js,

const app = new koa()
// const render = require("koa-art-template");             //config/init.js
/* const {resolve} = require('path'); */
// const bodyParser = require("koa-bodyparser")        //config/init.js
/* render(app,{
    //root:resolve(__dirname,'views'),
    root:`${process.cwd()}/views`,
    extname:'.html',   //后缀也可以写成.art
    debug:process.env.NODE_ENV !== 'production'
}); */                                  //config/init.js

const initManage = require("./config/init")
initManage(app)
/* router.get('/',async ctx=>{
    await ctx.render("index")
}) */                                  //router/index.js
/* 启动路由 */
// app.use(router.routes())            //config/init.js
/* app.use(cors());
app.use(bodyParser()) */                //config/init.js
app.listen(8082)